<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
</head>
<body>
<div class="search">
	<form action="" method="post">
		<b>姓名查询：</b>
		<input type="text" name="name" value="{$name}" >
		<input type="submit" value="查询" value="{$name}" class="submit">
		<input type="button" value="添加" onclick="add();" class="button" />
		<input type="button" value="批量导入" onclick="import();" class="button" />
	</form>
</div>
<div class="list">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
            <th style="min-width: 30px;"><input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('key[]'); } else { clearAll('key[]'); }" ></th>
            <th width="8%">姓名</th>
            <th width="10%">工作地点</th>
            <th width="10%">部门</th>
            <th width="12%">职务</th>
            <th width="8%">工作牌号</th>
            <th width="16%">邮箱</th>
            <th width="6%">性别</th>
            <th width="10%">生日</th>
            <th width="6%">状态</th>
            <th width="12%">操作</th>
        </tr>
    </thead>
 
    <tbody>
   	  <volist name="data" id="vo" empty="$empty">
        <tr>
            <td><input type="checkbox" name="key[]" value="{$vo.id}"></td>
            <td>{$vo.name|default="---"}</td>
            <td>{$vo.work_add|default="---"}</td>
            <td>{$vo.dept_name|default="---"}</td>
            <td>{$vo.job_title|default="---"}</td>
            <td>{$vo.work_card|default="---"}</td>
            <td>{$vo.work_email|default="---"}</td>
            <td>{$vo.sex|default="---"}</td>
            <td>{$vo.birthday|default="---"}</td>
            <td><if condition="$vo['work_status'] eq '1'" > 在职<else />离职</if></td>
            <td><a href="javascript:void(0)" onclick="edit({$vo.id})" >编辑</a>  |  <a href="javascript:void(0)" onclick="del({$vo.id})">删除</a>  |  <a href="javascript:void(0)" onclick="view({$vo.id})">详情</a></td>
        </tr>
      </volist>
    </tbody>
</table>
</div>
<div class="page">{$page}</div>
</body>
</html>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
});   
function del(id){
	if (confirm("真的要删除吗？数据删除之后不可恢复！")){
		$.get("__APP__/Resources/delete?id="+id,function(result){
			location.reload();
		});
	}else{
		return false;
	}
}
function edit(id){
	window.location.href="__APP__/Resources/edit?id="+id;
}
function add(){
	window.location.href="__APP__/Resources/add";
}
function view(id){
	window.location.href="__APP__/Resources/view?id="+id;
}
</script>  